package com.qf.controller;

import com.qf.bean.User;
import com.qf.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
@RequestMapping("/test")
public class TestController {
    @Autowired
    private TestService testService;

    @RequestMapping("/ssm")
    public String ssm(Model model) {
        List<User> userList = testService.findAll();
        model.addAttribute("userList", userList);
        model.addAttribute("key", "value");
        return "test";
    }
}
